<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<!--
    js基础语法  数据类型转换
     number  =>  string
     boolean => string
-->
<script>

    var num = 1
    console.log('typeof num :', typeof num)

    //   +  隐式转换  有字符串类型参与的运算 结果是string
    // num = num + ''

    // String()
    //  num = String(num)

    // toString()      number  ->  object  Number()
    num = num.toString()
    console.log(num)
    console.log('typeof num :', typeof num)


    var b = true
    console.log('typeof b :', typeof b)
    // b = b+''
    // b = String(b)
    b = b.toString()
    console.log('typeof b :', typeof b,b)



</script>
</body>
</html>

